package com.gtja.beoms.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

/**
 * 会话内容存档对象 qw_work_message
 *
 * @author LI
 * @date 2021-07-06
 */
public class QwWorkMessage {


    /**
     * 主键
     */
    private Integer id;

    /**
     * 企业表ID （mc_corp.id）
     */
    private String corpId;

    /**
     * 消息的seq值，标识消息的序号
     */
    private Integer seq;

    /**
     * 消息唯一标识
     */
    private String msgId;

    /**
     * 消息动作，0.send(发送消息) 1.recall(撤回消息) 2.switch(切换企业日志)
     */
    private String action;

    /**
     * 群ID
     */
    private String roomId;

    /**
     * 消息发送方id。同一企业内容为userid，非相同企业/机器人为external_userid
     */
    private String fromId;

    /**
     * 消息接收方列表，可能是多个，同一个企业内容为userid，非相同企业为external_userid
     */
    private String tolist;

    /**
     * 接收方类型 0通讯录 1外部联系人 2群
     */
    private String tolistType;

    /**
     * 文本消息类型，包括text、image、...
     */
    private String msgType;

    /**
     * 文本内容：详细见wx文档
     */
    private String content;

    /**
     * 消息发送时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date msgTime;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastUpdateTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCorpId() {
        return corpId;
    }

    public void setCorpId(String corpId) {
        this.corpId = corpId;
    }

    public Integer getSeq() {
        return seq;
    }

    public void setSeq(Integer seq) {
        this.seq = seq;
    }

    public String getMsgId() {
        return msgId;
    }

    public void setMsgId(String msgId) {
        this.msgId = msgId;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public String getRoomId() {
        return roomId;
    }

    public void setRoomId(String roomId) {
        this.roomId = roomId;
    }

    public String getFromId() {
        return fromId;
    }

    public void setFromId(String fromId) {
        this.fromId = fromId;
    }

    public String getTolist() {
        return tolist;
    }

    public void setTolist(String tolist) {
        this.tolist = tolist;
    }

    public String getTolistType() {
        return tolistType;
    }

    public void setTolistType(String tolistType) {
        this.tolistType = tolistType;
    }

    public String getMsgType() {
        return msgType;
    }

    public void setMsgType(String msgType) {
        this.msgType = msgType;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getMsgTime() {
        return msgTime;
    }

    public void setMsgTime(Date msgTime) {
        this.msgTime = msgTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(Date lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }
}
